export default filename => {
    var index= filename.lastIndexOf(".");
	//获取后缀
    var ext = filename.substr(index+1);
    var imgTypes = /png|jpg|jpeg|bmp|gif|webp|psd|svg|tiff/;
    var audioTypes = /cda|wav|mp3|wmv|flac|aac/;
    var videoTypes = /mp4|avi|mov|rmvb|rm|flv|3gp/;
    if (imgTypes.test(ext)) {
        return 'image'
    }
    if (audioTypes.test(ext)) {
        return 'audio'
    }
    if (videoTypes.test(ext)) {
        return 'video'
    }
    return 'other'
}